#include "allactorfactory.h"
#include "meshdrawableactor.h"
#include "deviceactor.h"
#include "singlelayeractor.h"
#include "statusactor.h"
#include "defaulttransform.h"
//#include "referenceactor.h"
#include "oceanactor.h"
#include "skydomeactor.h"
#include "animationeffect.h"
#include "guidemapactor.h"
#include "linkpointactor.h"
#include "environmentobjectactor.h"
#include "environmentlayeractor.h"
#include "blinkEffect.h"
#include "devicegroup.h"
#include "texturebillboardeffect.h"
#include "nodemarkeffect.h"
#include "bubbleeffectactor.h"
#include "professionpropertydefine.h"
#include "obscuredplaneactor.h"
#include "freesurroundboxactor.h"
#include "remarklayer.h"
#include "nomeshremarkactor.h"
#include "areaactor.h"
#include "eyepositionlightsource.h"
#include "directionlightsource.h"
#include "collisionlayer.h"
#include "cameraanimationactor.h"
#include "cameraanimationlayer.h"
#include "fogsettingactor.h"
#include "alphaeffect.h"
#include "defaultstartcamerainfoactor.h"
#include "poorerwateractor.h"
#include "soundeffectactor.h"
#include "lineactor.h"
#include "uniformmotion.h"
#include "freeflagsactor.h"
#include "blinklighteffect.h"
#include "overallsoundactor.h"

namespace VrDataCore
{
	AllActorFactory::AllActorFactory()
	{}

	AllActorFactory::~AllActorFactory()
	{}

	CoreBase::ActorBase* AllActorFactory::createActorByDataType(const QString& type)
	{
		_actorBase = NULL;
		if(type == CLASS_MODEL)
			_actorBase = new MeshDrawableActor;
		else if(type == CLASS_DEVICE)
			_actorBase = new DeviceActor;
		else if(type == CLASS_DEVICE_GROUP)
			_actorBase = new DeviceGroup;
		else if(type == CLASS_LAYER)
			_actorBase = new SingleLayerActor;
		else if(type == CLASS_ENVIRONMENT_LAYER)
			_actorBase = new EnvironmentLayerActor;
		else if(type == CLASS_STATUS)
			_actorBase = new StatusActor;
		else if(type == CLASS_OCEAN)
			_actorBase = new OceanActor;
		else if(type == CLASS_SKYBOX)
			_actorBase = new SkyDomeActor;
		/*else if(type == CLASS_REFERENCE)
			_actorBase = new ReferenceActor;*/
		else if(type == CLASS_EFFECT_TRANSLATION)
			_actorBase = new TranslationEffect;
		else if(type == CLASS_EFFECT_ROTATION)
			_actorBase = new RotationEffect;
		else if(type == CLASS_EFFECT_ANIMATION)
			_actorBase = new AnimationEffect;
		else if(type == CLASS_EFFECT_TEXTUREBILLBOARD)
			_actorBase = new TextureBillboardEffect;
		else if(type == CLASS_EFFECT_BUBBLE)
			_actorBase = new BubbleEffectActor;
		else if(type == CLASS_EFFECT_NODEMARK)
			_actorBase = new NodeMarkEffect;
		else if(type == CLASS_EFFECT_BLINK)
			_actorBase = new BlinkEffect;
		else if(type == CLASS_EFFECT_MATERIAL_ALPHA)
			_actorBase = new AlphaEffect;
		else if(type == CLASS_EFFECT_SOUND)
			_actorBase = new SoundEffectActor;
		else if(type == CLASS_GUIDEMAP)
			_actorBase = new GuideMapActor;
		else if(type == CLASS_LINKPOINT)
			_actorBase = new LinkPointActor;
		else if(type == CLASS_ENVIRONMENTOBJECT)
			_actorBase = new EnvironmentObjectActor;
		else if(type == CLASS_PROFESSIONPROPERTY)
			_actorBase = new ProfessionPropertyDefine;
		else if(type == CLASS_OBSCUREDPLANE)
			_actorBase = new ObscuredPlaneActor;
		else if(type == CLASS_FREESURROUNDBOX)
			_actorBase = new FreeSurroundBoxActor;
		else if(type == CLASS_REMARKLAYER)
			_actorBase = new RemarkLayer;
		else if(type == CLASS_NOMESHREMARK)
			_actorBase = new NoMeshRemarkActor;
		else if(type == CLASS_AREA)
			_actorBase = new AreaActor;
		else if(type == CLASS_COLLISION_LAYER)
			_actorBase = new CollisionLayer;
		else if(type == CLASS_EYEPOSITION_LIGHTSOURCE)
			_actorBase = new EyePositionLightSource;
		else if(type == CLASS_DIRECTION_LIGHTSOURCE)
			_actorBase = new DirectionLightSource;
		else if(type == CLASS_CAMERA_ANIMATION)
			_actorBase = new CamreaAnimationActor;
		else if(type == CLASS_IMP_CAMERA_ANIMATION)
			_actorBase = new ImpCamreaAnimationActor;
		else if(type == CLASS_CAMERA_ANIMATION_LAYER)
			_actorBase = new CameraAnimationLayer;
		else if(type == CLASS_CAMERA_START_INFO)
			_actorBase = new DefaultStartCameraInfoActor;
		else if(type == CLASS_FOG_SETTING)
			_actorBase = new FogSettingActor;
		else if(type == CLASS_POORERWATER)
			_actorBase = new PoorerWaterActor;
		else if(type == CLASS_LINKLINE)
			_actorBase = new LineActor;
		else if(type == CLASS_FREEFLAGS)
			_actorBase = new FreeFlagsActor;
		else if(type == CLASS_EFFECT_STATICONOCEAN)
			_actorBase = new StaticOnOceanEffect;
		else if(type == CLASS_EFFECT_BLINKLIGHT)
			_actorBase = new BlinkLightEffect;
		else if(type == CLASS_OVERALLSOUNDACTOR)
			_actorBase = new OverallSoundActor;
		if(_actorBase!=NULL)
			_actorBase->init();
		return _actorBase;
	}
}